﻿Public Class fEditor

    Private Sub fEditor_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated

    End Sub

    Private Sub fEditor_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

        e.Cancel = True
        Engine.bEnding = True

    End Sub

    Private Sub fEditor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        MyBase.ClientSize = New Drawing.Size(Editor.winWidth, Editor.winHeight)

    End Sub

    Public Sub StartEngine()

        Static donethis As Boolean

        If Not donethis Then

            donethis = True

            Engine.GameLoop()
            
        End If

    End Sub


#Region "Mouse Handling"

    Private Sub fGame_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick

        Mouse.Input(Mouse.MouseInputType.MouseClick, e)

    End Sub

    Private Sub fGame_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDoubleClick

        Mouse.Input(Mouse.MouseInputType.MouseDoubleClick, e)

    End Sub

    Private Sub fGame_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown

        Mouse.Input(Mouse.MouseInputType.MouseDown, e)

    End Sub

    Private Sub fGame_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove

        Mouse.Input(Mouse.MouseInputType.MouseMove, e)

    End Sub

    Private Sub fGame_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp

        Mouse.Input(Mouse.MouseInputType.MouseUp, e)

    End Sub

#End Region

#Region "Keyboard Handling"

    Private Sub fEditor_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        Keyboard.Input(Keyboard.KeyboardInputType.KeyDown, e)
    End Sub

    Private Sub fEditor_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        Keyboard.Input(Keyboard.KeyboardInputType.KeyPress, e)
    End Sub

    Private Sub fEditor_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
        Keyboard.Input(Keyboard.KeyboardInputType.KeyUp, e)
    End Sub

#End Region

End Class